package com.guo.rpc.common;

import com.guo.rpc.bean.ServiceBean;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author: ljguo4
 * @email: ljguo4@iflytek.com
 * @Date: 2021/8/9 20:07
 * @Description:
 * @version: 1.0
 */
public class BeanConfig {
    public static Map<Class, ServiceBean> SERVICE_BEAN_MAP = new ConcurrentHashMap<>();

    public static void setServiceBean(Class<?> clazz, ServiceBean serviceBean) {
        SERVICE_BEAN_MAP.put(clazz, serviceBean);
    }

    public static ServiceBean getServiceBean(Class<?> clazz) {
        return SERVICE_BEAN_MAP.get(clazz);
    }
}
